 <script th:inline="javascript">
/*<![CDATA[*/

    function del(event,element){
    	event.preventDefault();
      	bootbox.confirm("您确定删除吗?", function(result) {
    	if(result){
    		var _id = $(element).attr("href").split("_")[0];
            var _page=$(element).attr("href").split("_")[1];
            var _viewState = $(element).attr("href").split('_')[2];
    		//这里修改了下，要传入的父页面的容器id
    		BOSS.remoteCall('promotion/goods/delete',$('#creditGoods_grid'),{id:_id,page:_page,viewState:_viewState});
    		}
    	}); 
    }
	
/*]]>*/
</script>
<table class="table table-striped table-bordered  table-advance table-hover" id="creditGoods_table">
	<thead>
		<tr>
            <th>编号</th>
			<th>名称</th>
			<th>开始时间</th>
			<th>结束时间</th>
            <th>类型</th>
			<th>操作</th>
		</tr>
	</thead>	
	<tbody>
		<tr class="odd gradeX" th:each="data : ${creditGoodsList}">
            <td th:text="${data.id}">

			</td>
			<td th:utext="|${data.creditGoodsName} ${data.status}|">
				 
			</td>
			<td th:text="${#calendars.format(data.startTime,'yyyy-MM-dd HH:mm:ss')}">
			
			</td>
			<td th:text="${#calendars.format(data.endTime,'yyyy-MM-dd HH:mm:ss')}">
				 
			</td>
            <td th:text="${data.creditType.description}">

			</td>
			<td>
				 <a href="" th:href="@{'/promotion/goods/edit/'+${data.id}}" th:attr="id=${'edit_link_'+dataStat.index}"  class="btn default btn-xs purple" ><i class="fa fa-edit"></i>编辑</a>|
				 <a href="#" th:href="|${data.id}_${creditGoodsList.number}_${viewState}|"  th:attr="id=${'delete_link_'+dataStat.index}" class="btn default btn-xs purple" onclick="del(event,this);"><i class="fa fa-minus"></i>移除</a>
				 <a href="#" th:href="@{'/promotion/creditgoodsgoods/index/'+${data.id}}" th:attr="id=${'link_addgoods_'+dataStat.index},name=${'link_addgoods_'+dataStat.index}" class="btn default btn-xs purple"><i class="fa fa-plus"></i>添加商品</a>
			</td>		 
		</tr>
        <tr>
			<td colspan="5" align="center" th:if="${creditGoodsList.getNumberOfElements()==0}">未查到任何记录，请放大查询条件试试</td>
		</tr>
 	</tbody>
</table>
<div th:include="page_footer" th:with="viewState=${viewState},url=${'/promotion/goods/list'},pageContext=${creditGoodsList}"></div>